
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.14&key=d19175e7d183c81d76480495c8db97de"></script> 
<style type="text/css">
#container {
	/*width:1920px;*/ 
	margin: 4%;
	height: 800px;
	 }  
</style>


	<div id="container"></div> 

<script type="text/javascript">
	var map = new AMap.Map('container',{ zoom:13});
	map.clearMap();  
	var markers = []; 
	var infoWindow;
	$.ajax({
	url : "/api/alidata/getlocation",
	type : "get",
	dataType : "json",
 
	success : function(e,data) {
		
		// var data=[{"fLong":'112.00003','fLati':'38.2345'},{"fLong":'115.00003','fLati':'38.2345'},{"fLong":'114.00003','fLati':'38.2345'},{"fLong":'116.00003','fLati':'38.2345'}];
		// e.data = data;
		var marker;
		for(var i=0 ; i< e.length;i++){
			var jfong=[ e[i].lng,e[i].lat];	
				marker = new AMap.Marker({
			    position: jfong,
			    zIndex: 10,
				
				    

				});	
			marker.setMap(map);
			marker.setLabel({          
				offset: new AMap.Pixel(-15, -15),
				content: "青岛青科"      
				});			
			marker.orderON=e[i].lat;
			// marker.tranOFID=e.data[i].tranOFID;
			// marker.fhadd=e.data[i].fhadd;
			// marker.sAdd=e.data[i].sAdd;
			// marker.status=e.data[i].status;			
			 marker.on('click', function(e){
				 infoWindow.setContent("<ul class='main'>"
				 		 +"<li>  企业名称： <span style='color:blue'>"+e.target.orderON+"</span></li>" 
				         +"  </span></li></ul>");
				 infoWindow.open(map, e.lnglat);
			 });
			
			
		}	// for-end
		
		infoWindow = new AMap.InfoWindow({
			isCustom:	true,
			draggable: true,  //是否可拖动
	        offset: new AMap.Pixel(0, -31),
	        content:""
	    });
		
	}
		
 
})

</script>
